package com.kaishengit.dao;


import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.kaishengit.core.dao.BaseDao;
import com.kaishengit.pojo.Employee;
import com.kaishengit.pojo.Product;

@Repository
public class ProductDao extends BaseDao<Product, Integer> {

	public Product findNameByEmployeeId(Employee e) {
		
		String hql = "from ProductEmployee where Employee = ?";
		Query query = getSession().createQuery(hql);
		query.setParameter(0, e);
		return  (Product) query.list();
		
	}

	

}
